<!DOCTYPE html>
<html>
  <head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
   <script type="text/javascript">
       function reloadImage(){
           document.getElementById('identity').src='validateCode?ts='+new Date().getTime();
       }
   </script>
   <img src="validateCode" id="identity"/>
   <input type="button" value="换个图片" onclick="reloadImage()" id="btn">
  </head>
  
  <body>
           
  </body>
</html>